package com.hopkinscsc.windows;

import java.awt.*;
/**
 * An extension of the Element class for circles
 * @see Element
 * @author Nate
 *
 */
public class Circle extends Element{
	private int dw;
	private int dh;
	
	public Circle(int dw, int dh, int x, int y){
		super(x, y, 0, 0);
		this.dw = dw;
		this.dh = dh;
	}

	private int getDiameterWidth() {
		return dw;
	}
	
	private int getDiameterHeight() {
		return dh;
	}
	
	@Override
	void draw(Graphics g) {
		g.setColor(Color.BLACK);
		if (fill())
			g.fillOval(getX(), getY(), getDiameterWidth(), getDiameterHeight());
		else
			g.drawOval(getX(), getY(), getDiameterWidth(), getDiameterHeight());
	}
}
